﻿@model NK.Mvc3.Models.Sale
@{
    ViewBag.Title = "SaleSummary";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    SaleSummary</h2>
<fieldset>
    <legend>Sale</legend>
    <div class="display-label">
        DateSale</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.DateSale)
    </div>
    <div class="display-label">
        StaffName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.StaffName)
    </div>
    <p>
        @if (Model.SaleDetails.Count > 0)
        {
            <table>
                <tr>
                    <th>
                        BarCode
                    </th>
                    <th>
                        POS Description
                    </th>
                    <th>
                        Quantity
                    </th>
                    <th>
                        CostSale
                    </th>
                    <th>
                        TotalCost
                    </th>
                </tr>
                @foreach (var item in Model.SaleDetails)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.ProductInfo.BarCode)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.ProductInfo.POSDescription)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Quantity)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.CostSale)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.TotalCost)
                        </td>
                    </tr>
                }
            </table>
        }
    </p>
</fieldset>
<p>
    <a href="#">Print Bill</a> |
    @Html.ActionLink("Back to Sale", "Sale")
</p>
